/*
 * @Author: likang xie
 * @Date: 2019-06-03 13:38:32
 * @Usage toast封装
 */

export default (title, type = "none", mask = false) => {
  switch (type) {
    case "success":
      uni.showToast({
        title,
        icon: "none",
        image: "/static/icons/success.png",
        mask,
      });
      break;
    case "error":
      uni.showToast({
        title,
        icon: "none",
        image: "/static/icons/error.png",
        mask,
      });
      break;
    default:
      uni.showToast({
        title,
        icon: "none",
        mask,
      });
      break;
  }
};
